﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EECMISWS
{
    /// <summary>
    /// 航信Web接口返回参数
    /// </summary>
    public class WebReturnArgs
    {
        /// <summary>
        /// 调用是否成功
        /// </summary>
        private bool _callSuccessed = false;
        public bool CallSuccessed
        {
            get
            {
                return this._callSuccessed;
            }
            set
            {
                this._callSuccessed = value;
            }
        }

        /// <summary>
        /// 期望的操作是否成功
        /// </summary>
        private bool _success = false;
        public bool Success
        {
            get
            {
                return this._success;
            }
            set
            {
                this._success = value;
            }
        }

        /// <summary>
        /// 调用发生的异常记录
        /// </summary>
        private string _exception = "";
        public string ExceptionString
        {
            get
            {
                return this._exception;
            }
            set
            {
                this._exception = value;
            }
        }

        /// <summary>
        /// 接口返回的错误代码
        /// </summary>
        private string _errorCode = "CRJ0000";
        public string ErrorCode
        {
            get
            {
                return this._errorCode;
            }
            set
            {
                this._errorCode = value;
            }
        }

        /// <summary>
        /// 接口返回的操作结果信息
        /// </summary>
        private string _message = "";
        public string Message
        {
            get
            {
                return this._message;
            }
            set
            {
                this._message = value;
            }
        }

        /// <summary>
        /// 接口返回的Data的值
        /// </summary>
        private string _dataContent = "";
        public string DataContent
        {
            get
            {
                return this._dataContent;
            }
            set
            {
                this._dataContent = value;
            }
        }

        /// <summary>
        /// 自定义的错误代码
        /// </summary>
        private int _customCode = -1;
        public int CustomCode
        {
            get
            {
                return this._customCode;
            }
            set
            {
                this._customCode = value;
            }
        }

        public void Reset()
        {
            _callSuccessed = false;
            _success = false;
            _exception = "";
            _errorCode = "CRJ0000";
            _message = "";
            _dataContent = "";
            _customCode = -1;          
        }
    }
}
